package com.wbs.shop.nuby.api;

import com.qlmy.cn.config.ServiceConfig;

/**
 * Created by zhoucl on 2017/8/2 0002.
 */

public class ApiHelper {
    private static ApiService apiService;

    public static String getHost() {
        return ServiceConfig.INSTANCE.getCurrentServiceConfig().getApiUrl();
    }

    public static ApiService getApiService() {
        if (apiService == null) {
            apiService = new Api<>(getHost(), ApiService.class, new HeaderInterceptor(), new LoggerInterceptor("Logger", true)).getDefault();
        }
        return apiService;
    }
}
